
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zcvZipLib.h"
#include "com_javatoc_compress_zcvInterface.h"

/*
 * Class:     com_javatoc_compress_zcvInterface
 * Method:    ZcvZipInit
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_com_javatoc_compress_zcvInterface_ZcvZipInit
  (JNIEnv * env, jobject obj)
  {
	  return ZcvZipInit();
  }

/*
 * Class:     com_javatoc_compress_zcvInterface
 * Method:    ZcvZipDeInit
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_javatoc_compress_zcvInterface_ZcvZipDeInit
  (JNIEnv * env, jobject obj)
  {
	  ZcvZipCreate();
  }

/*
 * Class:     com_javatoc_compress_zcvInterface
 * Method:    ZcvZipCreate
 * Signature: ()I
 */
JNIEXPORT jint JNICALL Java_com_javatoc_compress_zcvInterface_ZcvZipCreate
  (JNIEnv * env, jobject obj)
  {
	  return ZcvZipCreate();
  }

/*
 * Class:     com_javatoc_compress_zcvInterface
 * Method:    ZcvZipRelease
 * Signature: (I)V
 */
JNIEXPORT void JNICALL Java_com_javatoc_compress_zcvInterface_ZcvZipRelease
  (JNIEnv * env, jobject obj, jint hndl)
  {
	  ZcvZipRelease(hndl);
  }

/*
 * Class:     com_javatoc_compress_zcvInterface
 * Method:    ZcvZipProcess
 * Signature: (ILjava/lang/String;Ljava/lang/String;IIIIFIII)I
 */
JNIEXPORT jint JNICALL Java_com_javatoc_compress_zcvInterface_ZcvZipProcess
  (JNIEnv *env, jobject obj, jint hndl,
   jstring inFilename, jstring outFilename,
   jint vbitrate, jint abitrate,
   jint keyint, jint bframes, jfloat quality,
   jint width, jint height, jint fps)
   {
    printf("hellow param:");
	
	
	
	TVideoZipParam pa;

	const char* str = env->GetStringUTFChars(inFilename, 0);
	strcpy(pa.inFilename, str);
	env->ReleaseStringUTFChars(inFilename, 0);
	str = env->GetStringUTFChars(outFilename, 0);
	strcpy(pa.outFilename, str);
	env->ReleaseStringUTFChars(outFilename, 0);
	pa.vbitrate = vbitrate;
	pa.abitrate = abitrate;
	pa.keyint = keyint;
	pa.bframes = bframes;
	pa.quality = quality;
	pa.width = width;
	pa.height = height;
	pa.fps = fps;

	ZcvZip(hndl, &pa);

	return 0;
   }